package com.beordie.service.impl;

import com.beordie.dao.IPoliceDao;
import com.beordie.dao.impl.PoliceDaoImpl;
import com.beordie.model.Police;
import com.beordie.service.IPoliceService;

import java.util.List;

/**
 * @Classname PoliceServiceImpl
 * @Description TODO
 * @Date 2021/7/13 22:49
 * @Created 30500
 */
public class PoliceServiceImpl implements IPoliceService {
    IPoliceDao policeDao = new PoliceDaoImpl();

    @Override
    public List<Police> getAll() {
        return policeDao.getAll();
    }

    @Override
    public List<Police> getAllByLimit(boolean isLimit, int start, int size) {
        return policeDao.getAllByLimit(isLimit, start, size);
    }

    @Override
    public int insert(Police police) {
        return policeDao.insert(police);
    }

    @Override
    public int deleteById(int id) {
        return policeDao.deleteById(id);
    }

    @Override
    public int updateById(Police police, int id) {
        return policeDao.updateById(police, id);
    }

    @Override
    public Police findByNumName(String condition) {
        return policeDao.findByNumName(condition);
    }

    @Override
    public int getCount() {
        return policeDao.getCount();
    }
}
